﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GalaSoft.MvvmLight;
using System.Collections.ObjectModel;

namespace HospitalTracking.Model
{
    [Serializable]
    public class Department : ObservableObject
    {
        public const string NamePropertyName = "Name";

        private string _Name;

        public string Name
        {
            get { return _Name; }
            set
            {
                if (_Name != value)
                {
                    _Name = value;
                    RaisePropertyChanged(NamePropertyName);
                }
            }
        }


        public const string DescriptionPropertyName = "Description";

        private string _Description = string.Empty;

        public string Description
        {
            get { return _Description; }
            set
            {
                if (_Description != value)
                {
                    _Description = value;
                    RaisePropertyChanged(DescriptionPropertyName);
                }
            }
        }

        public const string PatientsPropertyName = "Patients";

        private ObservableCollection<Patient> _Patients = new ObservableCollection<Patient>();
       

        public Department(string name, string description, ObservableCollection<Patient> patients)
        {
            this.Name = name;
            this.Description = description;
            this.Patients = patients;
        }

        public ObservableCollection<Patient> Patients
        {
            get { return _Patients; }
            set
            {
                if (_Patients != value)
                {
                    _Patients = value;
                    RaisePropertyChanged(PatientsPropertyName);
                }
            }
        }


        
        
    }
}
